package com.canbot.u05.view;


import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.canbot.u05.R;

public class ImageTextButton extends RelativeLayout {

        protected ImageView mImageView;

        protected TextView textView1, textView;

        public ImageTextButton(Context context) {
                super(context, null);

        }

        public ImageTextButton(Context context, AttributeSet attributeSet) {
                super(context, attributeSet);
                LayoutInflater.from(context).inflate(R.layout.img_txt_bt, this, true);
                this.mImageView = (ImageView) findViewById(R.id.imgview);
                this.textView = (TextView) findViewById(R.id.textview);
                this.textView1 = (TextView) findViewById(R.id.textview2);
                this.setClickable(true);
                this.setFocusable(true);
        }

        public void setImageResource(int resourceID) {
                this.mImageView.setImageResource(resourceID);
        }

        public void setText(String text) {
                this.textView.setText(text);
        }

        public void setTextColor(int color) {
                this.textView.setTextColor(color);
        }

        public void setTextSize(float size) {
                this.textView.setTextSize(size);
        }

        public void setText2(String text) {
                this.textView1.setText(text);
        }

        public void setTextColor2(int color) {
                this.textView1.setTextColor(color);
        }

        public void setTextSize2(float size) {
                this.textView1.setTextSize(size);
        }

}
